<template>
  <div>
    <h2>App组件</h2>
    <h2>msg: {{ msg }}</h2>
    <hr />
    <!-- 
     vue2中组件上使用v-bind:xxx.sync
        相当于是给子组件传递了一个props数据 msg 和自定义事件 update:msg
      
     -->
    <A :msg.sync="msg"></A>
  </div>
</template>
<script>
import A from "./components/A.vue";
export default {
  name: "App",
  data() {
    return {
      msg: "hello",
    };
  },
  methods: {},
  components: {
    A,
  },
};
</script>

<style lang="less" scoped></style>
